package com.zyl.blog.processing.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.zyl.blog.common.domain.file.bean.FileStorage;
import org.apache.ibatis.annotations.Param;

import java.util.Optional;

/**
 * @version v1.0
 * @ProjectName: Personal_Blog_Server
 * @Package: com.zyl.blog.processing.mapper
 * @ClassName: FileStorageMapper
 * @Description:
 * @Author FinalFantasy
 * @Date 2025/8/14-14:08
 */
public interface FileStorageMapper extends MPJBaseMapper<FileStorage> {

    /**
     * 根据ID查询文件
     * @param id 文件ID
     * @return Optional<FileStorage>
     */
    Optional<FileStorage> findById(@Param("id") Long id);

    /**
     * 根据文件MD5查询文件
     * @param md5Hash   文件MD5
     * @return  Optional<FileStorage>
     */
    Optional<FileStorage> findByMd5Hash(String md5Hash);

}
